package com.halflife.comeElectricity.orderMng.order;

public enum OrderEnum {

    NOPAY(-1,"未付款"),
    WAITTOGET(0,"待接单"),
    WAITGO(1,"已接单"),
    STARTED(2,"已出发"),
    BACKING(3,"回单中"),
    FINISHED(4,"已完成"),
    PAYED(5,"已付款"),
    PAYREFND(9,"退款中"),
    PAYFREFUNDED(10,"已退款"),
    PAYFREFUNDFail(11,"退款失败"),
    CANCEL(-9,"已取消"),
    UNKNOW(100,"未知状态");

    public Integer m_orderStatus;
    public String m_status;

    OrderEnum(int orderStatus,String status){

        m_orderStatus = orderStatus;
        m_status = status;
    }

    public static void main(String[] args) {
        System.out.println(OrderEnum.FINISHED.m_status);
    }

    public static OrderEnum getStatus(int order_status){

        for(OrderEnum o : values()){

            if(order_status == o.m_orderStatus){

                return o;
            }
        }
        return UNKNOW;
    }
}
